home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / Think Class Libraries / CDictionary 1.0 / CSmartBartender.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-30  |  1.4 KB  |  58 lines  |  [TEXT/KAHL]

  1. /*****************************************************************************
  2. CSmartBartender.c
  3.  
  4.     see header for more information
  5.     
  6. SUPERCLASS = CBartender
  7. *****************************************************************************/
  8.  
  9. #include "CSmartBartender.h"
  10.  
  11. /*****************************************************************************/
  12. void CSmartBartender::ISmartBartender(Int16 MBARid)
  13. {
  14.     CBartender::IBartender( MBARid);
  15.  
  16. }    /* CSmartBartender::ISmartBartender */
  17. /*****************************************************************************/
  18. void CSmartBartender::DisableAllMenus( void)
  19. {
  20.     register MenuEntryP        theEntry;
  21.     register Int32            i;
  22.     register Int16            theID;
  23.     
  24.     HLock( theMenus);
  25.     theEntry = *theMenus;
  26.  
  27.     for (i = 0; i < numMenus; i++) 
  28.     {
  29.         theID = theEntry[i].MENUid;
  30.         if (theID < 100)
  31.             DisableItem( GetMHandle(theID), 0);
  32.     }
  33.     HUnlock( theMenus);
  34.     DrawMenuBar();
  35.  
  36. }    /* CSmartBartender::DisableAllMenus */
  37. /*****************************************************************************/
  38. void CSmartBartender::EnableAllMenus( void)
  39. {
  40.     register MenuEntryP        theEntry;
  41.     register Int32            i;
  42.     register Int16            theID;
  43.  
  44.     HLock( theMenus);
  45.     theEntry = *theMenus;
  46.  
  47.     for (i = 0; i < numMenus; i++) 
  48.     {
  49.         theID = theEntry[i].MENUid;
  50.         if (theID < 100)
  51.             EnableItem( GetMHandle(theID), 0);
  52.     }
  53.     HUnlock( theMenus);
  54.     DrawMenuBar();
  55.  
  56. }    /* CSmartBartender::EnableAllMenus */
  57. /*****************************************************************************/
  58.